from django.contrib.auth.decorators import login_required
from django.shortcuts import render, render_to_response
from django.utils.decorators import method_decorator
from django.views.generic import TemplateView


@method_decorator(login_required, name='get')
class IndexView(TemplateView):
    """首页"""

    template_name = 'index.html'


def page_not_found(request, **kwargs):
    """404 页面"""

    return render(request, '404.html')

